#ifndef CONTACTDELEGATE_H
#define CONTACTDELEGATE_H

#include <QSqlRelationalDelegate>
 #include <QFontMetrics>
 #include <QModelIndex>
 #include <QSize>

 class QAbstractItemModel;
 class QObject;
 class QPainter;

 static const int ItemSize = 256;

class ContactDelegate : public QSqlRelationalDelegate
{
    Q_OBJECT

public:
    ContactDelegate(QObject *parent = 0);


    //DISPLAY
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index ) const;

    //EDITOR
    /*
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
    void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    */
};

#endif // CONTACTDELEGATE_H
